package com.tony.blog.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: MainApplication
 * @Auther: 皮蛋布丁
 * @Date: 2021/08/09/21:06
 * @Description:
 */
@SpringBootApplication
@MapperScan(basePackages = "com.tony.blog.model.mapper")
@EnableAsync
@EnableScheduling
public class MainApplication extends SpringBootServletInitializer {

    /**
    * @Description: configure
    * @Param: [builder]
    * @return: org.springframework.boot.builder.SpringApplicationBuilder
    * @Author: 皮蛋布丁
    * @Date: 2021/8/9 21:25
    */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(MainApplication.class);
    }

    /**
    * @Description: main
    * @Param: [args]
    * @return: void
    * @Author: 皮蛋布丁
    * @Date: 2021/8/9 21:28
    */
    public static void main(String[] args) {
        SpringApplication.run(MainApplication.class,args);
    }
}
